// 订单管理模块

//引入工具函数
import request from '@/utils/request'

// 获取订单列表
export const getOrderListReq = params => {
  return request({
    method: 'get',
    url: '/order/list',
    params,
  })
}

// 获取商品列表
export const getGoodsListReq = params => {
  return request({
    method: 'get',
    url: '/goods/list',
    params,
  })
}

// 修改商品
export const editGoodsReq = data => {
  return request({
    method: 'post',
    url: '/goods/edit',
    data,
  })
}

// 删除商品
export const delGoodsReq = params => {
  return request({
    method: 'get',
    url: '/goods/del',
    params,
  })
}

//添加商品
export const addGoodsReq = data => {
  return request({
    method: 'post',
    url: '/goods/add',
    data,
  })
}

//获取订单详情
export const getOrderDetailReq = params => {
  return request({
    method: 'get',
    url: '/order/detail',
    params,
  })
}

//修改订单
export const editOrderReq = data => {
  return request({
    method: 'post',
    url: '/order/edit',
    data,
  })
}
